Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

theme.json docs: add missing settings & styles #36137

Merged
merged 2 commits into from
Nov 2, 2021
Merged

Conversation

oandregal
Copy link
Member

This PR updates the docs to add the undocumented settings & styles.

@oandregal oandregal requested a review from ajitbohra as a code owner November 2, 2021 09:58
@oandregal oandregal self-assigned this Nov 2, 2021
@oandregal oandregal added [Type] Developer Documentation Documentation for developers Global Styles Anything related to the broader Global Styles efforts, including Styles Engine and theme.json labels Nov 2, 2021
@@ -169,6 +169,9 @@ The settings section has the following structure:
{
"version": 1,
"settings": {
"border": {
"customRadius": false
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This landed in WordPress 5.8.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oh, thanks for catching that. I see what happened. I think it's fine to leave it in the "WordPress" as it was a bug and should have been ported to 5.8 anyway.

However, it prompts us to improve the docs to better pin a given setting/style to a given WordPress release (we'll certainly need this for WordPress 5.9).

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The handbook setup is very limited, so I wonder if we should just have different subsections per release. Something along the lines of:

  • Settings
    • WordPress 5.8
    • WordPress 5.9
    • Gutenberg

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

However, it prompts us to improve the docs to better pin a given setting/style to a given WordPress release (we'll certainly need this for WordPress 5.9).

💯 This would be useful in docs.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@mkaz, do you have any suggestions for this?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

For docs, I think we just need to use @since comments similar to how we would in code. It's not quite valid JSON, but if we consider the file to be JSONC (json with comments) we could do:

"settings": {
		"border": {
			// @since wp5.8.1
			"customRadius": false
			...

@carolinan
Copy link
Contributor

I think the blockGap could use a more detailed documentation because it is not self explanatory,

@oandregal oandregal changed the title them.json docs: add missing settings & styles theme.json docs: add missing settings & styles Nov 2, 2021
@oandregal oandregal merged commit 0294605 into trunk Nov 2, 2021
@oandregal oandregal deleted the update/theme-json-docs branch November 2, 2021 10:41
@github-actions github-actions bot added this to the Gutenberg 11.9 milestone Nov 2, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Global Styles Anything related to the broader Global Styles efforts, including Styles Engine and theme.json [Type] Developer Documentation Documentation for developers
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants